project(Session LANGUAGES CXX)

# 启用自动处理
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

file(GLOB SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
file(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")

foreach(cppfile IN LISTS SRCS)
	message(STATUS "add file:${cppfile} to SessionObj")
endforeach()

add_library(SessionObj OBJECT ${SRCS})

target_include_directories(SessionObj
    PUBLIC
       ${Session_SOURCE_DIR}
       ${CMAKE_CURRENT_BINARY_DIR}/SessionObj_autogen/include
)

target_link_libraries(SessionObj
    PUBLIC
        Qt::Core
        Qt::Network
        Qt::Widgets
        ws2_32
)